﻿using UnityEngine;
using System.Collections;
using UnityEditor;
using System.IO;
using UnityEngine.UI;
using System.Collections.Generic;
using UnityEditor.SceneManagement;

public class FastKey
{
    [MenuItem("FastKey/To Demo Scene &#e", false, 6)]
    public static void FastToEntrance()
    {
        bool continueDo = false;
        if (Application.isPlaying == true)
        {
            continueDo = true;
        }
        else
        {
            if (EditorSceneManager.SaveCurrentModifiedScenesIfUserWantsTo())
            {
                continueDo = true;
            }
        }
        if (continueDo)
        {

            EditorSceneManager.OpenScene(Application.dataPath + "/Demo/Scenes/Demo.unity");
        }
    }


    [MenuItem("FastKey/Open PersistentDataPath &#p", false, 106)]
    public static void OpenAppliaction()
    {
        EditorUtility.OpenWithDefaultApp(Application.persistentDataPath);
    }

    [MenuItem("FastKey/Open DataPath &#d", false, 107)]
    public static void OpenDataPath()
    {
        EditorUtility.OpenWithDefaultApp(Application.dataPath.Replace("Assets", ""));
    }

}
